/* ImageJ 1.51 macro language -- Michael Cammer 20170222 If you use this, please acknowledge DART Microscopy Lab at NYULMC. User draws (freehand, straight, or segmented) line selection on image. Runs "Get X Y and intensity values". Chooses location on curve, remembers X location. User clicks on image window, runs "Mark spot on cell [q]", and inserts X location. Macro marks on the image. Suggested features to add: = Draw location on as overlay in color(s). = Instead of choosing location in Plot Profile window, the macro marks the points based on criteria such as two brightest points along ROI. */ var globalx = newArray(65535); var globaly = newArray(65535); var globallength = 0; macro "Get X Y and intensity values" { run("Interpolate", "interval=1"); Roi.getCoordinates(xpoints, ypoints); globallength = xpoints.length; for (i=0; i